package com.key.service;

import com.key.common.R;
import com.key.common.dto.WithdrawalAssetsDTO;
import com.key.common.dto.WithdrawalDTO;
import com.key.common.vo.AssetsTVO;
import com.key.entity.Assets;
import com.key.entity.ReceiptAssets;
import com.key.entity.WithdrawalAssets;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tc
 * @create 2023-02-20 10:13
 */
public interface WithdrawalAssetsService {

    /**
     * 依据领用的单号去退库
     * @param withdrawalAssetsDTO
     * @return
     */
    R creatWithdrawal(WithdrawalAssetsDTO withdrawalAssetsDTO);

    /**
     * 依据领用的单号去删除
     * @param withdrawalNumber
     * @return
     */
    R deleteWithdrawalAssets(@Param("withdrawalNumber") String withdrawalNumber);

    /**
     * 依据条件修改退库单
     * @param withdrawalDTO
     * @return
     */
    R editWithdrawalAssets(WithdrawalDTO withdrawalDTO);

    /**
     * 查找退库单
     * @return
     */
    R findWithdrawalAssets(WithdrawalDTO withdrawalDTO);

    //查询退库单下的资产
    List<Assets> findAssetsByWithdrawalAssets(@Param("withdrawalAssets") WithdrawalAssets withdrawalAssets);

    //查询退库单下的资产
    List<AssetsTVO> findAssetsVTOByWithdrawalAssets(@Param("withdrawalAssets") WithdrawalAssets withdrawalAssets);


}
